# 函数的定义：使用关键字def，后接函数名及()，其中小括号里面放形参列表，形参可以有0或多个
def add1(x1,x2):   # 这里的x1,x2叫形参（形式参数）
    res = x1 + x2
    return res

def eat():  # 没有参数
    print("我要吃饭。。。")  # 没有返回值

def eat1(what1):  # 一个参数
    print("我要吃"+what1)

def eat2(what1="none",what2 = "香蕉"):  # 两个参数
    print("我要吃"+what1+"和"+what2)

def eat3():
    print("我吃了。。。")
    str3 = "香蕉"
    return str3

def eat4(time):
    if 6 <= time and 9 >= time:
        return "{}点吃早饭".format(time)
    if 11 <= time and 14 >= time:
        return "{}点吃午饭".format(time)
    if 18 <= time and 20 >= time:
        return "{}点吃晚饭".format(time)

def fun01(list01):
    list02 = [1,2,3,4]
    for i in list01:
        print(i)
    return list02+list01

def eat5(what1,what2,*args):
    print("我今天要吃{},{}和{}".format(what1,what2,args))
    print("我还吃了：",args)
    print("我还吃了：",*args)
    print(*args)

def eat6(what1,what2,**kwargs):
    print("我今天要吃{},{}".format(what1,what2))
    print(str5)

if __name__ == '__main__':
    # 一系列代码。。。
    print("......")
    # a = 546
    # b = 689
    # res1 = add1(a,b)  # 这里的a,b叫实参（实际参数）
    # print("...",res1)
    # eat()
    str1 = "苹果"
    # eat1(str1)
    str2 = "螺蛳粉"
    # eat2(str2,str1)
    # eat2(what2=str1)
    # eat2(what1=str1,what2=str1)
    # eat2(str2)
    # eat2(str1,str2)

    # str4 = eat3()
    # print(str4)
    # time1 = int(input("请输入时间："))
    # str5 = eat4(time1)
    # print(str5)
    # list03 = ['a','b',5,6]
    # list04 = fun01(list03)
    # print(list04)
    str3 = "牛奶"
    str4 = "包子"
    str5 = "油条"
    eat6(str1,str2,san=str3,si=str4,wu=str5)